$(function(){



	function On_CM_CalBtnClick()
	{
	    if($("cm_benjin").value == "" || isNaN($("cm_benjin").value) || $("cm_benjin").value <= 0)
	    {
	        alert("请输入正确的贷款金额！");
			return;
	    }
	    
	    if($("cm_term").value == "" || isNaN($("cm_term").value) || $("cm_term").value <= 0 || $("cm_term").value > 360)
	    {
	        alert("请输入正确的贷款总期数！");
			return;
	    }
	    
	     if($("cm_rate").value == "" || isNaN($("cm_rate").value) || $("cm_rate").value <= 0)
	    {
	        alert("请输入正确的贷款年利率！");
			return;
	    }
	    
		var url = "/cmbwebpubinfo/inc/result01.aspx?total="+$("cm_benjin").value+"&yearrate="+$("cm_rate").value+"&terms="+$("cm_term").value+"&payfun="+$("cm_type").value;
		var calWnd = null;	
		var nWinLeft = (screen.width-585)/2;
		var nWinTop = (screen.height-400)/2;
		if ( calWnd != null )
			calWnd.close();
		calWnd = window.open(url, 'calWnd', 'scrollbars=yes,resizable=yes,status=yes,width=580,height=400,left='+nWinLeft+',top='+nWinTop);		
	}
});